package com.neusoft.dibuy.m3elm.demo2;

public class Dog extends  Animal{
    @Override
    public void work() {
        System.out.println("Dog.work");
    }

    /**
     * TODO 重载条件
     * 1、一个类的内部
     * 2、方法名相同
     * 3、参数类型不同
     * 4、与返回值类型无关
     * @param i
     */
     public void  work( int  i  )
    {
        System.out.println("i = " + i);
    }
    public void  work( float j   )
    {
        System.out.println("j = " + j);
    }

    public static void main(String[] args) {
        Dog  dog1 =new Dog();
        dog1.work(1);
        Dog  dog2 =new Dog();
        dog2.work(1.0f );
    }
}
